local conform = require("conform")

conform.setup({
    formatters_by_ft = {
        lua = { "stylua" },
        sh = { "shfmt" },
        zsh = { "shfmt" },
        ["_"] = { "trim_whitespace", "trim_newlines" },
    },
    format_on_save = {
        lsp_format = "fallback",
        timeout_ms = 500,
    },
})

conform.formatters.stylua = {
    prepend_args = { "--indent-type", "Spaces" },
}

conform.formatters.shfmt = {
    prepend_args = { "-s", "-ci", "-sr" },
}
